from . import index_blue
from flask import current_app, render_template

from info import redis_store


# 2. 使用蓝图实现路由
@index_blue.route('/')
def index():
    redis_store.set('name', 'jack')
    current_app.logger.info(current_app.url_map)
    return render_template('index.html')


@index_blue.route('/favicon.ico')
def favicon():
    return current_app.send_static_file('news/favicon.ico')


@index_blue.route('/detail')
def detail():
    return render_template('detail.html')
